﻿using System;
using System.Web;
using System.Web.UI.WebControls;

namespace UDS.WebApp.Controls
{
    public class UDSDataGrid : DataGrid
    {
        /// <summary>
        /// ctor.
        /// </summary>
        public UDSDataGrid()
        {
            // Set the common properties
            PageSize = 15;
            CssClass = "datagrid";
            AllowPaging = true;
            AllowSorting = true;
            AutoGenerateColumns = false;

            /*
             * <SelectedItemStyle CssClass="datagrid_selected_row" />
             * <AlternatingItemStyle CssClass="datagrid_alt_row" />
             * <ItemStyle CssClass="datagrid_row" />
             * <HeaderStyle CssClass="datagrid_header" />
             * <FooterStyle CssClass="datagrid_footer" />
             * <PagerStyle NextPageText="" CssClass="datagrid_pager" Mode="NumericPages" />
             */
            // Set styles
            SelectedItemStyle.CssClass = "datagrid_selected_row";
            AlternatingItemStyle.CssClass = "datagrid_alt_row";
            ItemStyle.CssClass = "datagrid_row";
            HeaderStyle.CssClass = "datagrid_header";
            FooterStyle.CssClass = "datagrid_footer";
            PagerStyle.CssClass = "datagrid_pager";
            PagerStyle.Mode = PagerMode.NumericPages;
        }
    }
}
